Method and apparatus for encoding image by exponential Golomb binarization using optimal threshold, and method and apparatus for decoding image by exponential Golomb binarization using optimal threshold

ABSTRACT

A method and apparatus for coding an image by using exponential Golomb binarization are provided. The method comprises: performing entropy coding on an input image by performing exponential Golomb binarization using a plurality of predetermined thresholds; measuring a bit rate of a bit stream which is generated by performing the entropy coding using each threshold; and determining an optimal threshold by comparing bit rates with regard to the thresholds.

CROSS-REFERENCE TO RELATED PATENT APPLICATIONS

This application claims the priority from Korean Patent Application No.10-2007-0103724, filed on Oct. 15, 2007, in the Korean IntellectualProperty Office, the disclosure of which is incorporated herein in itsentirety by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

Methods and apparatuses consistent with the present invention relate toencoding an image, and decoding an image, and more particularly, toencoding an image which has an optimal bit rate by performing optimalentropy coding, and decoding the image.

2. Description of the Related Art

Image compression standards include entropy coding. Hereinafter, theentropy encoding of the related art H.264 standard will be describedwith reference to FIG. 1.

FIG. 1 is a flowchart illustrating entropy encoding. The entropyencoding 100 of the related art H.264 standard comprises three steps;binarization 110, context modeling 120, and binary arithmetic coding130.

In the binarization 110, an absolute value of a quantized discretecosine transform DCT coefficient is converted into binary bit streamwhich consists of 0 and/or 1.

In the context modeling 120, in order to encode information related to amacroblock which is called syntax, context indexes, that is, syntax andbinary values, are received.

In the binary arithmetic coding 130, a probability section is repeatedlydivided according to a probability of individual symbols. A bit stream,which is generated by entropy coding and the binary arithmetic coding,is output.

FIG. 2 shows procedures of binarization according to a magnitude codingscheme.

A quantized DCT coefficient 200 includes a coefficient code 210 and acoefficient absolute value 220. A unary code of context-based adaptivearithmetic coding (CABAC) consists of either “1” bits or “0” bits. Atruncated unary code is larger than 0 or smaller than a threshold, andis defined only by the same quantized DCT coefficient. A quantized DCTcoefficient which is smaller than a threshold is represented by a unarycode, and a quantized DCT coefficient which is equal to a threshold isrepresented only by a “1” bit by ignoring a “0” bit.

When the coefficient absolute value abs or 220 is larger than 1, a “1”bit is assigned (230), or otherwise, a “0” bit is assigned (235). Whenthe coefficient absolute value is larger than 1, a value obtained bysubtracting 2 from the coefficient absolute value is updated as anabsolute value abs (240). When the updated coefficient absolute valueabs (hereinafter, this will be referred to as a coefficient absolutevalue) is 0, a “0” bit is assigned (250), or otherwise, a “1” bit isassigned (255). When the coefficient absolute value abs consists of “1”bits (260), a “0” bit is assigned if the coefficient absolute value isnot larger than a threshold, or otherwise, exponential Golombbinarization is performed on a value (abs-s) obtained by subtracting thethreshold from the coefficient absolute value.

In the entropy coding by using binarization using related art binaryGolomb coding, a threshold S is fixed, and the coding depends on acompression data format. However, in a high bit rate environment, thefixed threshold is not appropriate.

SUMMARY OF THE INVENTION

Exemplary embodiments of the present invention overcome the abovedisadvantages and other disadvantages not described above. Also, thepresent invention is not required to overcome the disadvantagesdescribed above, and an exemplary embodiment of the present inventionmay not overcome any of the problems described above.

The present invention provides methods and apparatuses for encoding anddecoding an image by performing entropy coding using exponential Golombbinarization, which can be optimally performed by determining an optimalthreshold for exponential Golomb binarization which is adaptive to imagedata.

According to an aspect of the present invention, there is provided amethod of encoding an image using exponential Golomb coding, the methodcomprising: performing entropy coding on an input image by exponentialGolomb binarization using a plurality of predetermined thresholds;measuring a bit rate of a bit stream which is generated by performingthe entropy coding using each threshold; and determining an optimalthreshold by comparing bit rates with regard to the thresholds.

The method may further comprise outputting a bit stream which isgenerated by performing the entropy coding by exponential Golombbinarization using the determined optimal threshold.

The method may further comprise transmitting the determined optimalthreshold together with the output bit stream.

The determining of the optimal threshold may include determining athreshold which has the smallest bit rate from among the thresholds whena same quantization parameter is applied, and the thresholds may bedetermined for individual frames or individual blocks in each frame.

The threshold may be applied to data of at least one of the formatsincluding luma, chroma, intra mode, and inter mode.

The performing of entropy coding may include binarization, contextmodeling and binary arithmetic coding.

According to another aspect of the present invention, there is providedan apparatus for encoding an image by using exponential Golomb coding,the apparatus comprising: a circular coding unit which performs entropycoding on an input image by using exponential Golomb binarization usinga plurality of predetermined thresholds; a bit rate measuring unit whichmeasures a bit rate of a bit stream generated by performing the entropycoding using each threshold; and an optimal threshold determining unitwhich determines an optimal threshold by comparing the bit rates withregard to the thresholds.

The apparatus may further comprise a bit stream output unit whichoutputs a bit stream generated by performing the entropy coding byexponential Golomb binarization using the determined optimal threshold.

The apparatus may further comprise a threshold transmitting unit whichtransmits the determined optimal threshold together with the output bitstream.

According to another aspect of the present invention, there is provideda method of decoding an image by performing entropy decoding byexponential Golomb binarization using a plurality of predeterminedthresholds, the method comprising: receiving threshold information forexponential Golomb binarization, together with an image bit stream; andperforming entropy decoding by using exponential Golomb coding using thethreshold information, wherein the threshold information includes atleast one of a plurality of predetermined thresholds which are used forentropy coding an input image using exponential Golomb binarization inthe course of coding the image bit stream.

In the performing of the entropy decoding, thresholds which correspondsto individual frames or individual blocks in each frame may be used.

In the performing of the entropy decoding, a threshold which correspondsto data of at least one of formats including luma, chroma, intra mode,and inter mode may be used.

According to another aspect of the present invention, there is providedan apparatus for decoding an image by performing entropy decoding byexponential Golomb binarization using a plurality of predeterminedthresholds, the apparatus comprising: a receiving unit which receivesthreshold information for exponential Golomb binarization together withan image bit stream; and an entropy decoding unit which performs entropydecoding by using exponential Golomb binarization using the thresholdinformation, wherein the threshold information includes at least one ofa plurality of predetermined thresholds which are used for entropycoding an input image using exponential Golomb binarization in thecourse of coding the image bit stream.

According to another aspect of the present invention, there is providedan image stream including: a threshold for exponential Golombbinarization used for entropy coding of data in a payload region,wherein when the data in the payload region refers to at least one ofdata units including a frame or a block in a frame, luma, chroma, intramode and inter mode, the threshold is for the data in the payload area.

According to another aspect of the present invention, there is provideda computer readable recording medium having embodied thereon a computerprogram for executing the image coding method.

According to another aspect of the present invention, there is provideda computer readable recording medium having embodied thereon a computerprogram for executing the image decoding method.

According to the present invention, thresholds for exponential Golombbinarization are determined for individual frames or individual blocksin each frame, and thus more improved gain can be obtained, compared tothe related art coding scheme, in a high bit rate environment.

Since a frame division scheme for optimal threshold determination can beflexibly selected, the improved gain becomes greater as the framedivision becomes more detailed. The threshold can be determinedregardless of a frame format such as luma, chroma, intra mode, and intermode, as well as the frame division.

Moreover, since an optimal threshold generated in the course of codingis transmitted with an image bit stream, efficient entropy decoding canbe performed when an image is reconstructed.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects of the present invention will become moreapparent by describing in detail exemplary embodiments thereof withreference to the attached drawings in which:

FIG. 1 is a flowchart illustrating entropy encoding;

FIG. 2 shows procedures of binarization according to a magnitude codingscheme;

FIG. 3 is a block diagram of an image encoding apparatus according to anexemplary embodiment of the present invention;

FIG. 4 is a block diagram of an image decoding apparatus according to anexemplary embodiment of the present invention;

FIG. 5 illustrates a circular loop for determining thresholds;

FIG. 6 is a graph showing a first experimental result of the imageencoding apparatus in FIG. 3;

FIG. 7 is a graph showing a second experimental result of the imagedecoding apparatus in FIG. 4;

FIG. 8 is a graph showing a third experimental result of the imagedecoding apparatus in FIG. 4;

FIG. 9 illustrates an image bit stream according to an exemplaryembodiment of the present invention;

FIG. 10 is a flowchart illustrating an image encoding method accordingto an exemplary embodiment of the present invention; and

FIG. 11 is a flowchart illustrating an image decoding method accordingto an exemplary embodiment of the present invention.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS OF THE INVENTION

An image encoding method by using entropy encoding using thresholds ofexponential Golomb binarization which is determined according to anexemplary embodiment of the present invention and an apparatus of theimage encoding method, and an image decoding method by using the entropyencoding using the thresholds and an apparatus of the image decodingmethod will now be described with reference to FIGS. 3 to 11.

FIG. 3 is a block diagram of an image encoding apparatus 300 accordingto an exemplary embodiment of the present invention. The image encodingapparatus 300 includes a circular encoding unit 310, a bit ratemeasuring unit 320, an optimal threshold determining unit 330, and a bitstream output unit 340.

The circular encoding unit 310 receives an input image, and performsentropy coding on the input image by using exponential Colombbinarization for an absolute value of an input DCT coefficient by usingvarious predetermined thresholds. Then, the circular encoding unit 310outputs bit streams generated for individual thresholds to the bit ratemeasuring unit 320.

Although not illustrated in drawings, the image input to the circularencoding unit 310 may be a quantized DCT coefficient which is obtainedby performing DCT on input image data and quantizing the transformed DCTcoefficient.

The entropy encoding includes the steps of binarization, contextmodelling, and binary arithmetic coding.

According to the current exemplary embodiment of the present invention,thresholds of all blocks in all frames or individual frames aredetermined. The blocks include macro blocks of various sizes. Withregard to data of at least one of formats including luma, chroma, anintra mode, and an inter mode, thresholds which are respectivelyadaptive to data may be determined.

The bit rate measuring unit 320 receives the bit streams from thecircular encoding unit 310, measures the bit rate of each bit streamwhich is generated by performing entropy coding using each threshold,and outputs the measured bit rates according to individual thresholds tothe optimal threshold determining unit 330.

The optimal threshold determining unit 330 receives the bit rates fromthe bit rate measuring unit 320, determines the optimal threshold amonga plurality of thresholds by comparing the bit rates of a plurality ofbit streams generated using the thresholds, and outputs the determinedoptimal threshold to the bit stream output unit 340.

The optimal threshold determined by the optimal threshold determiningunit 330 is a threshold which generates the smallest bit rate from amongbit rates of bit streams generated by performing entropy coding in whichthe bit streams are binarized using each threshold.

The bit stream output unit 340 receives the optimal threshold from theoptimal threshold determining unit 330, and outputs the bit stream whichis generated by performing the entropy coding with Golomb coding usingthe determined optimal threshold.

Although not illustrated in the drawings, the current exemplaryembodiment includes a threshold transmitting unit to transmit theoptimal threshold together with the output bit stream.

The threshold transmitting unit may transmit the optimal threshold as anoverhead of image data to be transmitted. The optimal threshold may betransmitted through a channel that is different from the channel throughwhich the image data is transmitted, or may be transmitted by storing itin a header region of the bit stream of the image data.

FIG. 4 is a block diagram of an image decoding apparatus 400 accordingto an exemplary embodiment of the present invention. Referring to FIG.4, the image decoding apparatus 400 includes a receiving unit 410, andan entropy decoding unit 420.

The receiving unit 410 receives thresholds related to exponential Golombbinarization, and outputs them to the entropy decoding unit 420.

According to the current exemplary embodiment, the receiving unit 410extracts the threshold from an overhead of a bit stream. According toanother exemplary embodiment, the receiving unit 410 may receive thethresholds which are transmitted through a channel that is differentfrom the channel through which the bit streams are transmitted.

The entropy decoding unit 420 receives the threshold from the receivingunit 410, and performs entropy decoding by using exponential Golombbinarization using the received thresholds.

In the entropy decoding, thresholds which correspond to individualframes or individual blocks in each frame are used.

In the entropy decoding, an optimal threshold which corresponds to dataof at least one of the formats including luma, chroma, intra mode, andinter mode is employed.

Although not illustrated in the drawings, the image decoding apparatus400 reconstructs an image using the entropy decoded data.

FIG. 5 illustrates a circular loop for determining thresholds.

The image encoding apparatus 300 in FIG. 3 includes an entropy codingprocedure 500 using exponential Golomb binarization using the optimalthreshold.

Input image data is input to a threshold-determining loop 510. Accordingto the current exemplary embodiment, the input image data is an absolutevalue of a quantized DCT coefficient of the input image. Thethreshold-determining loop 510 selects a threshold for the exponentialGolomb binarization within a predetermined range. When the optimalthreshold-determining loop is repeated, the threshold is changed withinthe predetermined range.

The entropy coding is performed by a binarization procedure 520 in whichthe exponential Golomb binarization is performed using the thresholddetermined by the threshold-determining loop 510, a context modellingprocedure 530 and a binary arithmetic coding procedure 540. Thethreshold-determining loop 510 may determine optimal thresholdsdifferently for a part of the frames, that is, each frame or each blockin each frame.

A bit rate of a bit stream generated by performing the entropy codingusing a predetermined threshold is measured so as to evaluate codingperformance of the predetermined threshold. Furthermore, within thepredetermined range, bit rates of the generated bit streams relating tomore than one threshold are compared to each other, so that the optimalthreshold which generates an optimal bit rate is determined (550).

The threshold-determining loop 510 outputs the optimal threshold, whichis determined as a result of the entropy coding performed, withdifferent thresholds, to a standard entropy performing procedure. Thatis, the optimal threshold can be applied intact to a context-basedadaptive arithmetic coding (CABAC) context modelling scheme of therelated art H.264 standard. Thus, the determined optimal threshold isinput together with the input image data (the absolute value of thequantized DCT coefficient of the input image in the current exemplaryembodiment) to a binarization procedure 560 of the standard entropycoding procedure, and is used for the exponential Golomb coding. A bitstream is entropy coded by performing the binarization procedure 560, acontext modelling procedure 570 and a binary arithmetic coding procedure580, and the entropy coded bit stream is output.

The threshold-determining loop 510 outputs the optimal threshold so asto transmit the optimal threshold together with a bit stream which isgenerated by standard entropy coding.

Hereinafter, with reference to FIGS. 6 to 8, results of experimentsperformed with the exemplary embodiments of the present invention willbe described. In the experiments which will now be described, an optimalframe is determined for each frame, and only the first T frame isencoded with 8×8 macro block size mode inactivated.

FIG. 6 is a graph showing a first experimental result of the imageencoding apparatus 300 in FIG. 3.

Referring to FIG. 6, the horizontal axis of the graph indicatesquantized parameters QP, and the vertical axis indicates bits. FIG. 6shows a comparison between an experimental result 620 of the imageencoding apparatus in FIG. 3 and a result 610 according to the relatedart Anchor coding scheme of the H.264 standard, with regard to a“Mobile” video sequence.

Referring to FIG. 6, the encoding result 620 of the image encodingapparatus in FIG. 3 has smaller bits than the result of the related artanchor coding 610 when the quantized parameter is smaller. Compared tothe related art entropy coding, according to the exemplary embodimentsof the present invention, a constant peek signal to noise ratio (PSNR)is obtained and bit streams with smaller bits are generated when thespecific quantized parameter is set. Especially, when the quantizedparameter is less than 10, that is, in a high bit rate, the imageencoding apparatus according to the exemplary embodiments of the presentinvention shows an improved performance compared to the related artcoding scheme.

FIG. 7 is a graph showing a second experimental result of the imagedecoding apparatus 400 in FIG. 4.

Referring to FIG. 7, the horizontal axis of the graph indicates aquantization parameter, and the vertical axis indicates bits. FIG. 7shows a comparison between an experimental result 720 of the imagedecoding apparatus in FIG. 4 and a result 710 according to the relatedart Anchor coding scheme of the H.264 standard, with regard to a “Bus”video sequence.

When the quantized parameter is less than 10, that is, in a high bitrate environment, the image encoding apparatus according to theexemplary embodiments of the present invention shows an improvedperformance compared to the related art coding scheme.

FIG. 8 is a graph showing a third experimental result of the imagedecoding apparatus 400 in FIG. 4.

The horizontal axis of the graph indicates a quantization parameter, andthe vertical axis indicates percentage gain. FIG. 8 shows an average bitrate gain of the result that the image encoding method of the exemplaryembodiments of the present invention obtains as compared with the resultof the related art coding scheme when the image encoding method of theexemplary embodiments of the present invention is applied videosequences of “Foreman”, “Mobile”, “Bus”, “Football”, “City”, “Crew”,“Harbor”, and “Soccer”.

Referring to FIG. 8, according to the exemplary embodiment of thepresent invention, the image encoding apparatus obtains a larger gainwhen the quantization parameter is smaller, that is, when the bit rateis higher. The reason why the image encoding method according to theexemplary embodiments of the present invention can obtain an improvedresult when the bit rate is higher is that an absolute value of aresidual to be encoded becomes larger in a high bit rate.

FIG. 9 illustrates an image bit stream 900 according to an embodiment ofthe present invention. The image encoding apparatus 300 in FIG. 3transmits the optimal threshold together with the image bit stream byusing the transmitting unit 340, and the receiving unit 410 of the imagedecoding apparatus 400 in FIG. 4 receives the threshold and the imagebit stream.

The image encoding apparatus 300 records information of the optimalthreshold corresponding to data about the image which is recorded on thepayload region 920 to a predetermined position 915 of a header region910 in the image bit stream 900.

The image decoding apparatus 400 extracts the threshold from the headerregion 910 in the image bit stream 900 for exponential Golombbinarization.

Although the optimal threshold data is added as an overhead 915 for theimage bit stream, it does not interrupt performance improvement sinceonly few bits are assigned to the optimal threshold data in a high bitrate environment.

FIG. 10 is a flowchart illustrating an image encoding method accordingto an exemplary embodiment of the present invention.

In operation 1010, entropy coding is performed by using exponentialGolomb binarization using a plurality of thresholds.

In operation 1020, bit rates of a bit stream which are generated byperforming the entropy coding using each threshold are measured.

In operation 1030, an optimal threshold which has the smallest bit rateis determined by comparing the bit rates with respect to the thresholds.

According to the exemplary embodiment of the present invention, a bitstream, which is generated by performing the entropy coding byexponential Golomb binarization using the optimal threshold, is output.The determined optimal threshold may be transmitted together with theoutput bit stream.

FIG. 11 is a flowchart illustrating an image decoding method accordingto an exemplary embodiment of the present invention.

In operation 1110, the threshold for the exponential Golomb binarizationis received together with the image bit stream.

In operation 1120, entropy decoding is performed by using theexponential Golomb binarization using the received threshold.

The exemplary embodiments of the present invention can be written ascomputer programs and can be implemented in general-use digitalcomputers that execute the programs using a computer readable recordingmedium. Examples of the computer readable recording medium includemagnetic storage media (e.g., ROM, floppy disks, hard disks, etc.), andoptical recording media (e.g., CD-ROMs, or DVDs).

While the present invention has been particularly shown and describedwith reference to exemplary embodiments thereof, it will be understoodby those of ordinary skill in the art that various changes in form anddetails may be made therein without departing from the spirit and scopeof the present invention as defined by the following claims.

What is claimed is:
 1. A method of encoding an image using exponentialGolomb coding, the method comprising: performing entropy coding on aninput image by exponential Golomb binarization using a plurality ofpredetermined thresholds; measuring a bit rate of each of a plurality ofbit streams which are generated by performing the entropy coding usingeach of the plurality of predetermined thresholds; and determining anoptimal threshold for exponential Golomb binarization by comparing thebit rates of the plurality of bit streams generated with regard to theplurality of predetermined thresholds wherein thresholds with regard todata of at least one of formats including luma, chroma, an intra mode,and an inter mode which are respectively adaptive to data may bedetermined based on the corresponding data format.
 2. The method ofclaim 1, further comprising: outputting a bit stream which is generatedby performing the entropy coding by exponential Golomb binarizationusing the determined optimal threshold.
 3. The method of claim 2,further comprising: transmitting the determined optimal thresholdtogether with the output bit stream.
 4. The method of claim 1, whereinthe determining the optimal threshold comprises determining a thresholdwhich has a smallest bit rate from among the plurality of predeterminedthresholds when a same quantization parameter is applied, and thethresholds are determined for individual frames or individual blocks ineach individual frame.
 5. The method of claim 1, wherein the optimalthreshold is applied to data of at least one of formats including luma,chroma, intra mode, and inter mode.
 6. The method of claim 1, whereinthe performing the entropy coding includes binarization, contextmodeling and binary arithmetic coding, and the input image is anabsolute value of a quantized value from a discrete cosinetransformation coefficient of the input image.
 7. An apparatus forencoding an image by using exponential Golomb coding, the apparatuscomprising: a circular coding unit which performs entropy coding on aninput image by performing exponential Golomb binarization using aplurality of predetermined thresholds; a bit rate measuring unit whichmeasures a bit rate of each of a plurality of bit streams generated byperforming the entropy coding using each of the plurality ofpredetermined thresholds; and an optimal threshold determining unitwhich determines an optimal threshold for exponential Golombbinarization by comparing the bit rates of the plurality of bit streamsgenerated with regard to the plurality of predetermined thresholds,wherein at least one of the circular coding unit, bit rate measuringunit and optimal threshold determining unit is implemented as a hardwarecomponent wherein thresholds with regard to data of at least one offormats including luma, chroma, an intra mode, and an inter mode whichare respectively adaptive to data may be determined based on thecorresponding data format.
 8. The apparatus of claim 7, furthercomprising: a bit stream output unit which outputs a bit streamgenerated by performing the entropy coding by exponential Golombbinarization using the determined optimal threshold.
 9. The apparatus ofclaim 8, further comprising: a threshold transmitting unit whichtransmits the determined optimal threshold together with the output bitstream.
 10. The apparatus of claim 7, wherein the optimal thresholddetermining unit determines a threshold which has a smallest bit ratefrom among the plurality of predetermined thresholds when a samequantization parameter is applied, and the threshold is determined forindividual frames or individual blocks in each individual frame.
 11. Theapparatus of claim 7, wherein the optimal threshold is applied to dataof at least one of formats including luma, chroma, intra mode, and intermode.
 12. The apparatus of claim 7, wherein the entropy coding comprisesbinarization, context modeling and binary arithmetic coding, and theinput image is an absolute value of a quantized DCT coefficient of theinput image.
 13. A method of decoding an image by entropy decoding byperforming exponential Golomb binarization using a plurality ofpredetermined thresholds, the method comprising: receiving thresholdinformation for exponential Golomb binarization, together with an imagebit stream; and performing entropy decoding by using exponential Golombcoding using the received threshold information, wherein the receivedthreshold information comprises an optimal threshold which is used forentropy coding an input image using exponential Golomb binarization tocode the image bit stream wherein the optimal threshold is determined bycomparing bit rates of a plurality of bit streams generated with regardto the plurality of predetermined thresholds, and wherein thresholdswith regard to data of at least one of formats including luma, chroma,an intra mode, and an inter mode which are respectively adaptive to datamay be determined based on the corresponding data format.
 14. The methodof claim 13, wherein in the performing of the entropy decoding,thresholds which correspond to individual frames or individual blocks ineach individual frame are used.
 15. An apparatus for decoding an imageby entropy decoding by performing exponential Golomb binarization usinga plurality of predetermined thresholds, the apparatus comprising: areceiving unit which receives threshold information for exponentialGolomb binarization together with an image bit stream; and an entropydecoding unit which performs entropy decoding by using exponentialGolomb binarization which uses the threshold information, wherein thethreshold information includes an optimal threshold which is used forentropy coding an input image using exponential Golomb binarization tocode the image bit stream and the optimal threshold is determined bycomparing bit rates of a plurality of bit streams generated with regardto the plurality of predetermined thresholds, wherein at least one ofthe receiving unit and the entropy decoding unit is implemented as ahardware component, and wherein thresholds with regard to data of atleast one of formats including luma, chroma, an intra mode, and an intermode which are respectively adaptive to data may be determined based onthe corresponding data format.
 16. A non-transitory computer readablerecording medium having embodied thereon a computer program forexecuting a method of encoding an image using exponential Golomb coding,the method comprising: performing entropy coding on an input image byexponential Golomb binarization using a plurality of predeterminedthresholds; measuring a bit rate of each of a plurality of bit streamswhich are generated by performing the entropy coding using each of theplurality of predetermined thresholds; and determining an optimalthreshold for exponential Golomb binarization by comparing the bit ratesof the plurality of bit streams generated with regard to the pluralityof predetermined thresholds, wherein thresholds with regard to data ofat least one of formats including luma, chroma, an intra mode, and aninter mode which are respectively adaptive to data may be determinedbased on the corresponding data format.
 17. A non-transitory computerreadable recording medium having embodied thereon a computer program forexecuting a method of decoding an image by entropy decoding byperforming exponential Golomb binarization using a plurality ofpredetermined thresholds, the method comprising: receiving thresholdinformation for exponential Golomb binarization, together with an imagebit stream; and performing entropy decoding by using exponential Golombcoding using the received threshold information, wherein the receivedthreshold information comprises an optima threshold which is used forentropy coding an input image using exponential Golomb binarization tocode the image bit stream, the optimal threshold being determined bycomparing bit rates of a plurality of bit streams generated with regardto the plurality of predetermined thresholds, and wherein thresholdswith regard to data of at least one of formats including luma, chroma,an intra mode, and an inter mode which are respectively adaptive to datamay be determined based on the corresponding data format.